import 'package:flutter/material.dart';
import 'package:untitled/utils/constants.dart';

class RoundedPasswordField  extends StatelessWidget {
  final ValueChanged<String>? onChanged;
  final String? myHintText;
  final TextEditingController? myController;
  
  const RoundedPasswordField({Key? key,
    this.onChanged, 
    this.myHintText, 
    this.myController,}) : super(key: key);

  @override
  Widget build(BuildContext context) {
     Size size = MediaQuery.of(context).size;
    return Container(
      margin: EdgeInsets.symmetric(vertical: 10),
      padding: EdgeInsets.symmetric(horizontal: 20,vertical: 5),
      width: size.width * 0.8,
      decoration: BoxDecoration(
        color: kPrimaryLightColor,
        borderRadius: BorderRadius.circular(29)
      ),
      child: TextField(
        controller: myController,
        obscureText: true,
        onChanged: onChanged,
        cursorColor: kPrimaryColor,
        decoration: InputDecoration(
          hintText: myHintText,
          icon: Icon(
            Icons.lock,
            color: kPrimaryColor,
          ),
          border: InputBorder.none

        ),
        
      ),
    );
    
  }
}